package net.skyedu.service.system;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.skyedu.bean.AppealObject;
import net.skyedu.dao.AppDao;


public class ShowObject extends HttpServlet {

	private static final long serialVersionUID = 5952060001106180351L;

	public ShowObject() {
		super();
	}

	public void destroy() {
		super.destroy(); // Just puts "destroy" string in log
	}

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		response.setContentType("text/html;charset=UTF-8");
		doPost(request,response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		response.setContentType("text/html;charset=UTF-8");
		request.setCharacterEncoding("UTF-8");
//		HttpSession session=request.getSession();
		
//		String userID=request.getParameter("USERID");
		AppDao ad = new AppDao();
		List<AppealObject> list = ad.showAppeal();
		
		request.setAttribute("list", list);
		request.getRequestDispatcher("attend/user/showAppealObject.jsp").forward(request, response);
	}

	public void init() throws ServletException {}

}
